package com.runda.partypolicy.app.page.activity.login;


import android.widget.Button;

import com.jakewharton.rxbinding2.view.RxView;
import com.runda.partypolicy.R;
import com.runda.partypolicy.app.base.BaseActivity;
import com.runda.partypolicy.app.others.Rxjava.RxUtil;
import com.runda.partypolicy.app.page.activity.Activity_Main;
import com.runda.partypolicy.app.page.viewmodel.ViewModel_Login;
import com.runda.partypolicy.utils.IntentUtil;


import androidx.lifecycle.ViewModelProviders;
import butterknife.BindView;

public class Activity_Login extends BaseActivity<ViewModel_Login> {


    @BindView(R.id.bt_loginin)
    Button btLoginin;

    @Override
    public int getLayout() {
        return R.layout.activity_login;
    }

    @Override
    public ViewModel_Login initViewModel() {
        return ViewModelProviders.of(this, getViewModelFactory()).get(ViewModel_Login.class);
    }

    @Override
    public void initEvents() {

    }

    @Override
    public void start() {
        RxView.clicks(btLoginin)
                .compose(RxUtil.operateDelay())
                .subscribe(o -> {
                    IntentUtil.startActivity(this, Activity_Main.class);
                });
    }

    @Override
    public void initNotSignEvent() {

    }

    @Override
    public void initNoNetworkEvent() {

    }

    @Override
    public void initShowMessageEvent() {

    }

    @Override
    public void initTokenOverTimeEvent() {

    }

    @Override
    public void initShowOrDismissWaitingEvent() {

    }

    @Override
    public void initStateLayoutEvent() {

    }


}
